package com.sc.passbook.vo;

import com.google.common.base.Enums;
import com.sc.passbook.constant.FeedBackType;
import lombok.Data;

/**
 * @author sc
 * Created on  2018/9/1
 */
@Data
public class FeedBack {
    private Long userId;
    private String type;
    private String templateId;
    private String comment;

    public boolean validate(){
        FeedBackType feedBackType = Enums.getIfPresent(FeedBackType.class, this.type.toUpperCase()).orNull();
        return !(feedBackType==null||comment==null);
    }
}
